package cn.my.springHDFS.repository;

import cn.my.springHDFS.domain.AdminUser;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

/**
 * Created by Leo on 2017/4/12.
 * 管理员用户DAO
 */
@Repository
public interface AdminRepository extends MongoRepository<AdminUser, String> {

    //查找管理员账号和管理员账号密码
    AdminUser findByAdminAccountAndAdminPassword(String adminAccount, String adminPassword);

    //分页模糊查询管理员信息
    Page<AdminUser> findByAdministratorLike(String administrator, Pageable pageable);

    //通过账号查询管理员对象
    AdminUser findByAdminAccount(String adminAccount);

}
